package pdfsetter.core.schema;

import java.util.List;

import pdfsetter.core.pages.PageInfo;
import pdfsetter.core.pages.PageRectangle;

/**
 * SinglePageSchema describes page and locations for pages to insert. It only tells where to place consecutive pages while setting the whole document.
 * 
 * @author Andrzej Dorobisz
 */
public class SinglePageSchema {
    private final String description;
    private final PageInfo pageInfo;
    private final List<PageRectangle> pageLocations;

    public String getDescription() {
        return description;
    }

    public PageInfo getPageInfo() {
        return pageInfo;
    }

    public List<PageRectangle> getPageLocations() {
        return pageLocations;
    }

    public SinglePageSchema(String description, PageInfo page, List<PageRectangle> pageLocations) {
        this.description = description;
        this.pageInfo = page;
        this.pageLocations = pageLocations;
    }

    public int numberOfPages() {
        return pageLocations.size();
    }
}
